use std::collections::HashMap;

pub mod sc;

#[derive(Debug, Clone)]
pub struct Service {
    pub name: String,
    pub domain: String,
    pub version: String,
}

pub type ServiceId = String;

#[derive(Debug, Clone)]
pub struct ServiceInstance {
    pub instance_id: ServiceInstanceId,
    /// schemaId: spec
    pub schemas: HashMap<String, String>,
    /// http://ip:port
    pub ep: String,
    pub status: ServiceInstanceStatus,
    pub last_utime: u64,
}

pub type ServiceInstanceId = String;

#[repr(u32)]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum ServiceInstanceStatus {
    Offline = 0,
    Starting,
    Up,
}
